package cn.smbms.mapper.supplier;

import cn.smbms.pojo.Provider;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.function.Supplier;

/**
 * @Auther: liyuxuan
 * @Date:2021/10/15 - 10 - 15 - 21:31
 */
public interface SupplierMapper {
    /**
     * 增加供应商
     * @param provider
     * @return
     * @throws Exception
     */
    public int add(Provider provider);


    /**
     * 通过供应商名称、编码获取供应商列表-模糊查询-providerList
     * @param proName
     * @return
     * @throws Exception
     */
    public List<Provider> getProviderList(@Param("proName") String proName,@Param("proCode") String proCode,@Param("currentPageNo") int currentPageNo,@Param("pageSize") int pageSize);

    /**
     * 通过proId删除Provider
     * @param delId
     * @return
     * @throws Exception
     */
    public int deleteProviderById(String delId);


    /**
     * 通过proId获取Provider
     * @param id
     * @return
     * @throws Exception
     */
    public Provider getProviderById(String id);

    /**
     * 修改用户信息
     * @param provider
     * @return
     * @throws Exception
     */
    public int modify(Provider provider);

    /**
     * 查询供货商表总记录条数
     * @return
     * @throws Exception
     */
    public int findAllTotalCount(@Param("proName") String proName,@Param("proCode") String proCode);

    public List<Provider> supplierList(int id);

    public List<Provider> getProvider(Provider Provider);
}
